dict1 = {21170410: '张三', 21170411: '李四', 21170412: '周五',
         21170413: '小龙', 21170414: '知青', 21170415: '文远'}

def ming(b):
    if b == '打印姓名':
        # 循环遍历打印
        for i in dict1:
            print(dict1[i],end='\t')
        print()


ming('打印姓名')

def diao(a):
    # get查找字典的key值，有则返回value的值
    # 没有则返回None
    print(dict1.get(a))
    if dict1.get(a) == None:
        print('没找到')

while True:
    a = int(input('请输入学号：'))
    diao(a)